package com.chencs.app.shop.service;

import com.chencs.vo.net.request.ShopRequest;
import com.chencs.webmvc.rest.RestFullTemplate;
import framework.model.ResponseOptUtil;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RequestMethod;

/**
 * Created by Administrator on 2017/10/10.
 */

@Service
public class AppShopService {


    @Autowired
    RestFullTemplate restTemplate;
    private static final String URLPATH = "service-common/app/shop/";

    /**
     *
     * @return
     */
    public String getShopList(@RequestBody ShopRequest request){
        String ret = restTemplate.postForObject(URLPATH + "list", String.class,request);
        return ret;
    }

    public String getShopInfo(@RequestBody ShopRequest request){
        String ret = restTemplate.postForObject(URLPATH + "getShopInfo", String.class,request);
        return ret;
    }

    public String getNewShopList(@RequestBody ShopRequest request){
        String ret = restTemplate.postForObject(URLPATH + "getShopList", String.class,request);
        return ret;
    }

}
